Integrand size = 31, antiderivative size = 131 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {3 (A-B) \text {arctanh}(\sin (c+d x))}{2 a d}-\frac {(3 A-4 B) \tan (c+d x)}{a d}+\frac {3 (A-B) \sec (c+d x) \tan (c+d x)}{2 a d}+\frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{d (a+a \sec (c+d x))}-\frac {(3 A-4 B) \tan ^3(c+d x)}{3 a d} \]
3/2*(A-B)*arctanh(sin(d*x+c))/a/d-(3*A-4*B)*tan(d*x+c)/a/d+3/2*(A-B)*sec(d *x+c)*tan(d*x+c)/a/d+(A-B)*sec(d*x+c)^3*tan(d*x+c)/d/(a+a*sec(d*x+c))-1/3* (3*A-4*B)*tan(d*x+c)^3/a/d
Time = 1.34 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.85 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {18 (A-B) \text {arctanh}(\sin (c+d x))-\frac {(3 A-11 B+2 (6 A-11 B) \cos (c+d x)+(3 A-7 B) \cos (2 (c+d x))+6 A \cos (3 (c+d x))-8 B \cos (3 (c+d x))) \sec ^3(c+d x) \tan (c+d x)}{1+\sec (c+d x)}}{12 a d} \]
(18*(A - B)*ArcTanh[Sin[c + d*x]] - ((3*A - 11*B + 2*(6*A - 11*B)*Cos[c + d*x] + (3*A - 7*B)*Cos[2*(c + d*x)] + 6*A*Cos[3*(c + d*x)] - 8*B*Cos[3*(c + d*x)])*Sec[c + d*x]^3*Tan[c + d*x])/(1 + Sec[c + d*x]))/(12*a*d)
Time = 0.70 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.89, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.323, Rules used = {3042, 4507, 3042, 4274, 3042, 4254, 2009, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^4 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{a \csc \left (c+d x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4507 |
\(\displaystyle \frac {\int \sec ^3(c+d x) (3 a (A-B)-a (3 A-4 B) \sec (c+d x))dx}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (3 a (A-B)-a (3 A-4 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {3 a (A-B) \int \sec ^3(c+d x)dx-a (3 A-4 B) \int \sec ^4(c+d x)dx}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 a (A-B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-a (3 A-4 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {a (3 A-4 B) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}+3 a (A-B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 a (A-B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {a (3 A-4 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {3 a (A-B) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (3 A-4 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 a (A-B) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (3 A-4 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {3 a (A-B) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (3 A-4 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
((A - B)*Sec[c + d*x]^3*Tan[c + d*x])/(d*(a + a*Sec[c + d*x])) + (3*a*(A - B)*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)) + (a *(3*A - 4*B)*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d)/a^2
3.1.82.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[d*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(a*f*( 2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)* (d*Csc[e + f*x])^(n - 1)*Simp[A*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && G tQ[n, 0]
Time = 0.87 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.27
method | result | size |
parallelrisch | \(\frac {-9 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+9 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {A}{2}-\frac {2 B}{3}\right ) \cos \left (3 d x +3 c \right )+\frac {\left (A -\frac {7 B}{3}\right ) \cos \left (2 d x +2 c \right )}{4}+\left (A -\frac {11 B}{6}\right ) \cos \left (d x +c \right )+\frac {A}{4}-\frac {11 B}{12}\right )}{2 a d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(167\) |
derivativedivides | \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 B -A}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (\frac {3 B}{2}-\frac {3 A}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {\frac {5 B}{2}-\frac {3 A}{2}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-\frac {B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {A -2 B}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {\frac {5 B}{2}-\frac {3 A}{2}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (-\frac {3 B}{2}+\frac {3 A}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) | \(190\) |
default | \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 B -A}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (\frac {3 B}{2}-\frac {3 A}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {\frac {5 B}{2}-\frac {3 A}{2}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-\frac {B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {A -2 B}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {\frac {5 B}{2}-\frac {3 A}{2}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (-\frac {3 B}{2}+\frac {3 A}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) | \(190\) |
norman | \(\frac {\frac {\left (-9 B +7 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}-\frac {2 \left (A -2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{a d}+\frac {\left (27 A -37 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a d}-\frac {\left (-49 B +39 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 a d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}-\frac {3 \left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a d}+\frac {3 \left (A -B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a d}\) | \(192\) |
risch | \(-\frac {i \left (9 A \,{\mathrm e}^{6 i \left (d x +c \right )}-9 B \,{\mathrm e}^{6 i \left (d x +c \right )}+9 A \,{\mathrm e}^{5 i \left (d x +c \right )}-9 B \,{\mathrm e}^{5 i \left (d x +c \right )}+24 A \,{\mathrm e}^{4 i \left (d x +c \right )}-24 B \,{\mathrm e}^{4 i \left (d x +c \right )}+12 A \,{\mathrm e}^{3 i \left (d x +c \right )}-24 B \,{\mathrm e}^{3 i \left (d x +c \right )}+27 A \,{\mathrm e}^{2 i \left (d x +c \right )}-39 B \,{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )} A -7 B \,{\mathrm e}^{i \left (d x +c \right )}+12 A -16 B \right )}{3 a d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{2 a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{2 a d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{2 a d}\) | \(276\) |
1/2*(-9*(1/3*cos(3*d*x+3*c)+cos(d*x+c))*(A-B)*ln(tan(1/2*d*x+1/2*c)-1)+9*( 1/3*cos(3*d*x+3*c)+cos(d*x+c))*(A-B)*ln(tan(1/2*d*x+1/2*c)+1)-8*tan(1/2*d* x+1/2*c)*((1/2*A-2/3*B)*cos(3*d*x+3*c)+1/4*(A-7/3*B)*cos(2*d*x+2*c)+(A-11/ 6*B)*cos(d*x+c)+1/4*A-11/12*B))/a/d/(cos(3*d*x+3*c)+3*cos(d*x+c))
Time = 0.28 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.30 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {9 \, {\left ({\left (A - B\right )} \cos \left (d x + c\right )^{4} + {\left (A - B\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, {\left ({\left (A - B\right )} \cos \left (d x + c\right )^{4} + {\left (A - B\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (4 \, {\left (3 \, A - 4 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{2} - {\left (3 \, A - B\right )} \cos \left (d x + c\right ) - 2 \, B\right )} \sin \left (d x + c\right )}{12 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}} \]
1/12*(9*((A - B)*cos(d*x + c)^4 + (A - B)*cos(d*x + c)^3)*log(sin(d*x + c) + 1) - 9*((A - B)*cos(d*x + c)^4 + (A - B)*cos(d*x + c)^3)*log(-sin(d*x + c) + 1) - 2*(4*(3*A - 4*B)*cos(d*x + c)^3 + (3*A - 7*B)*cos(d*x + c)^2 - (3*A - B)*cos(d*x + c) - 2*B)*sin(d*x + c))/(a*d*cos(d*x + c)^4 + a*d*cos( d*x + c)^3)
\[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {A \sec ^{4}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{5}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
(Integral(A*sec(c + d*x)**4/(sec(c + d*x) + 1), x) + Integral(B*sec(c + d* x)**5/(sec(c + d*x) + 1), x))/a
Leaf count of result is larger than twice the leaf count of optimal. 368 vs. \(2 (125) = 250\).
Time = 0.22 (sec) , antiderivative size = 368, normalized size of antiderivative = 2.81 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {B {\left (\frac {2 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a - \frac {3 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} - \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} + \frac {6 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - 3 \, A {\left (\frac {2 \, {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \]
1/6*(B*(2*(9*sin(d*x + c)/(cos(d*x + c) + 1) - 16*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 15*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a - 3*a*sin(d*x + c )^2/(cos(d*x + c) + 1)^2 + 3*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - a*sin (d*x + c)^6/(cos(d*x + c) + 1)^6) - 9*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a + 9*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a + 6*sin(d*x + c)/(a* (cos(d*x + c) + 1))) - 3*A*(2*(sin(d*x + c)/(cos(d*x + c) + 1) - 3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a - 2*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) - 3*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a + 3*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a + 2*sin(d*x + c)/(a*(cos(d*x + c) + 1))))/d
Time = 0.29 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.39 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {\frac {9 \, {\left (A - B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {9 \, {\left (A - B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {6 \, {\left (A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a} + \frac {2 \, {\left (9 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 16 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 9 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a}}{6 \, d} \]
1/6*(9*(A - B)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a - 9*(A - B)*log(abs(ta n(1/2*d*x + 1/2*c) - 1))/a - 6*(A*tan(1/2*d*x + 1/2*c) - B*tan(1/2*d*x + 1 /2*c))/a + 2*(9*A*tan(1/2*d*x + 1/2*c)^5 - 15*B*tan(1/2*d*x + 1/2*c)^5 - 1 2*A*tan(1/2*d*x + 1/2*c)^3 + 16*B*tan(1/2*d*x + 1/2*c)^3 + 3*A*tan(1/2*d*x + 1/2*c) - 9*B*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*a))/ d
Time = 13.85 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.16 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx=\frac {3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (A-B\right )}{a\,d}-\frac {\left (3\,A-5\,B\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {16\,B}{3}-4\,A\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (A-3\,B\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \]